import 'package:shared_preferences/shared_preferences.dart';

class EcyStorage {
  static Future<void> setString(key, value) async {
    SharedPreferences sp = await SharedPreferences.getInstance();
    await sp.setString(key, value);
  }

  static Future<String?> getString(key) async {
    SharedPreferences sp = await SharedPreferences.getInstance();
    String? value = await sp.getString(key);
    return value;
  }

  static Future<bool> remove(key) async {
    SharedPreferences sp = await SharedPreferences.getInstance();
    return await sp.remove(key);
  }

  static Future<bool> clear() async {
    SharedPreferences sp = await SharedPreferences.getInstance();
    return await sp.clear();
  }
}
